/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hojadetrabajo9;

/**
 *
 * @author RAUL
 */
public class Edge {
    private final String id; 
    private final Vertex source;
    private final Vertex destination;
    private final int weight; 
	
	public Edge(String id, Vertex source, Vertex destination, int weight) {
		this.id = id;
		this.source = source;
		this.destination = destination;
		this.weight = weight;
	}
	public int getWeight() {
		return weight;
	}
	
	public Vertex getDestination() {
		return destination;
	}
        public String getId() {
		return id;
	}
	public Vertex getSource() {
		return source;
	}
	
	
	@Override
	public String toString() {
		return source + " " + destination;
	}
    
}
